set terminal png
set output "1000_req_latency.png"
set title "Django - Latency for 1000 requests sent"
set size 1,0.7
set grid y
set xlabel "request"
set ylabel "response time (ms)"
legend_seq="Sequential: Min: `cat 1000_req_seq_v2.txt|awk {'print $2'}`, Mean: `cat 1000_req_seq_v2.txt|awk {'print $3'}`, Median: `cat 1000_req_seq_v2.txt|awk {'print $5'}`, Max:  `cat 1000_req_seq_v2.txt|awk {'print $6'}`,"
legend_con_5="5 Conccurent: Min: `cat 1000_req_5_cur_v2.txt|awk {'print $2'}`, Mean: `cat 1000_req_5_cur_v2.txt|awk {'print $3'}`, Median: `cat 1000_req_5_cur_v2.txt|awk {'print $5'}`, Max:  `cat 1000_req_5_cur_v2.txt|awk {'print $6'}`,"
legend_con_20="20 Conccurent: Min: `cat 1000_req_20_cur_v2.txt|awk {'print $2'}`, Mean: `cat 1000_req_20_cur_v2.txt|awk {'print $3'}`, Median: `cat 1000_req_20_cur_v2.txt|awk {'print $5'}`, Max:  `cat 1000_req_20_cur_v2.txt|awk {'print $6'}`,"
plot "1000_req_seq.txt" using 9 smooth sbezier with lines title legend_seq,\
"1000_req_5_cur.txt" using 9 smooth sbezier with lines title legend_con_5, \
"1000_req_20_cur.txt" using 9 smooth sbezier with lines title legend_con_20

set terminal png
set output "100_req_latency.png"
set title "Django - Latency for 100 requests sent"
set size 1,0.7
set grid y
set xlabel "request"
set ylabel "response time (ms)"
legend_seq="Sequential: Min: `cat 100_req_seq_v2.txt|awk {'print $2'}`, Mean: `cat 100_req_seq_v2.txt|awk {'print $3'}`, Median: `cat 100_req_seq_v2.txt|awk {'print $5'}`, Max:  `cat 100_req_seq_v2.txt|awk {'print $6'}`,"
legend_con_5="5 Conccurent: Min: `cat 100_req_5_cur_v2.txt|awk {'print $2'}`, Mean: `cat 100_req_5_cur_v2.txt|awk {'print $3'}`, Median: `cat 100_req_5_cur_v2.txt|awk {'print $5'}`, Max:  `cat 100_req_5_cur_v2.txt|awk {'print $6'}`,"
legend_con_20="20 Conccurent: Min: `cat 100_req_20_cur_v2.txt|awk {'print $2'}`, Mean: `cat 100_req_20_cur_v2.txt|awk {'print $3'}`, Median: `cat 100_req_20_cur_v2.txt|awk {'print $5'}`, Max:  `cat 100_req_20_cur_v2.txt|awk {'print $6'}`,"
plot "100_req_seq.txt" using 9 smooth sbezier with lines title legend_seq, \
"100_req_5_cur.txt" using 9 smooth sbezier with lines title legend_con_5, \
"100_req_20_cur.txt" using 9 smooth sbezier with lines title legend_con_20


set terminal png
set output "10000_req_latency.png"
set title "Django - Latency for 10000 requests sent"
set size 1,0.7
set grid y
set xlabel "request"
set ylabel "response time (ms)"
legend_seq="Sequential: Min: `cat 10000_req_seq_v2.txt|awk {'print $2'}`, Mean: `cat 10000_req_seq_v2.txt|awk {'print $3'}`, Median: `cat 10000_req_seq_v2.txt|awk {'print $5'}`, Max:  `cat 10000_req_seq_v2.txt|awk {'print $6'}`,"
legend_con_5="5 Conccurent: Min: `cat 10000_req_5_cur_v2.txt|awk {'print $2'}`, Mean: `cat 10000_req_5_cur_v2.txt|awk {'print $3'}`, Median: `cat 10000_req_5_cur_v2.txt|awk {'print $5'}`, Max:  `cat 10000_req_5_cur_v2.txt|awk {'print $6'}`,"
legend_con_20="20 Conccurent: Min: `cat 10000_req_20_cur_v2.txt|awk {'print $2'}`, Mean: `cat 10000_req_20_cur_v2.txt|awk {'print $3'}`, Median: `cat 10000_req_20_cur_v2.txt|awk {'print $5'}`, Max:  `cat 10000_req_20_cur_v2.txt|awk {'print $6'}`,"

plot "10000_req_seq.txt" using 9 smooth sbezier with lines title legend_seq, \
"10000_req_5_cur.txt" using 9 smooth sbezier with lines title legend_con_5, \
"10000_req_20_cur.txt" using 9 smooth sbezier with lines title legend_con_20 
